{extend name="web/public/base" /}
{block name="header"}
{/block}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><a><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">购物商城</li>
        <li class="active">{$title}</li>
    </ul>
    <div class="row">
        <div class="col-sm-12">
            <section class="panel panel-default">
                <header class="panel-heading"> {$title}</header>
                <!--<div style="margin-top: 10px;margin-left:15px;margin-bottom: 10px;">-->
                <!--<button type="button" class="btn btn-primary" onclick="allAuditing();">一键发货</button>-->
                <!--</div>-->
                {include file="web/public/search" /}
                {notempty name="_list"}
                <div class="table-responsive">
                    <table class="table table-striped table-hover b-t b-light text-sm">
                        <thead>
                        <tr style="cursor:pointer;">
                            <th>下单时间</th>
                            <th>会员账号</th>
                            <th>订单编号</th>
                            <th>商品名称</th>
                            <th>商品总额</th>
                            <!--<th>所属店铺</th>-->
                            <!--<th>商品分类</th>-->
                            <th>状态</th>
                            <!--<th>配送方式</th>-->
                            <th>{$Think.const.OP}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name='_list' id='vo'}
                        <tr>
                            <td>{$vo.pay_time|date="Y-m-d H:i:s",###}</td>
                            <td>{$vo.uid|getInfo="usernumber",###}[{$vo.uid|getInfo="realname",###}]</td>
                            <td>{$vo.tag}</td>
                            <td>{$vo.goodname}</td>
                            <td>{$vo.total}</td>
                            <!--<td>{$vo.store_name}</td>-->
                            <!--<td>{$vo.cate_name}</td>-->
                            <td>
                                {eq name="vo.status" value="1"}待发货{/eq}
                                {eq name="vo.status" value="10"}待确认{/eq}
                                {eq name="vo.status" value="20"}已完成{/eq}
                                <!--{eq name="vo.status" value="5"}<span style="color:red;">有申诉</span>{/eq}-->
                                <!--{eq name="vo.status" value="6"}退货退款{/eq}-->
                            </td>
                            <!--<td>-->
                            <!--{eq name="vo.shipway" value="1"}快递{/eq}-->
                            <!--{eq name="vo.shipway" value="2"}自提{/eq}-->
                            <!--</td>-->
                            <td>
                                <!--{eq name="vo.status" value="1"}-->
                                <!--<button onclick="fahuo({$vo.id});return false;">发货</button>-->
                                <!--{/eq}-->
                                <a class="btn btn-link"
                                   href="{:url('details',array('id'=>$vo['id'],'action'=>$action))}">查看详情</a>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
                <footer class="panel-footer">
                    <div class="row">
                        <div class="text-right text-center-xs">
                            {$page}
                        </div>
                    </div>
                </footer>
                {else/}
                <div style="text-align: center">
                    <image src="__PUBLIC__/images/empty.jpg"></image>
                </div>
                {/notempty}
            </section>
        </div>
    </div>
</section>
{/block}
{block name="script"}
<script type="text/javascript">
    //    $('.toolid').each(function () {
    //        $(this).change(function () {
    //            var toolid = $(this).val();
    //            var id = $(this).parent().find('input[name=id]').val();
    //            $.post("{:url('changeToolid')}", {toolid: toolid, id: id}, function (data) {
    //                layer.msg(data.msg);
    //                if (data.code) {
    //                    setTimeout(function () {
    //                        location.reload();
    //                    }, 1000)
    //                }
    //            }, 'json');
    //        })
    //    })

    /**
     * 发货
     * @param id
     */
    function fahuo(id) {
        $.post("{:url('send')}", {id: id}, function (data) {
            layer.msg(data.msg);
            if (data.code) {
                setTimeout(function () {
                    location.reload();
                }, 1000)
            }
        }, 'json')
    }

</script>
{/block}
{block name="footer"}
{/block}